<template>
    <div>
        <h2>Home组件内容</h2>
        <div>
            <ul class="nav nav-tabs">
                <li>
                    <router-link replace class="list-group-item" active-class="active" to="/home/news">News</router-link>
                </li>
                <li>
                    <router-link replace class="list-group-item" active-class="active" to="/home/message">Message</router-link>
                </li>
            </ul>
            <!--如果是使用keep-alive是使用缓存功能-->
            <router-view></router-view>
        </div>
    </div>
</template>

<script>
export default {
    name: "HomePage",
    beforeDestroy() {
        console.log("Home组件即将被销毁")
    },
    mounted() {
        console.log("Home组件被挂挂载")
    }
}
</script>

<style scoped>

</style>